package com.mongodb.application.utils;

import java.io.Serializable;

/**
 * 
 * @ClassName: BaseReturn 
 * @Description: TODO(定义基本数据返回类型) 
 * @author zhaiey
 * @date 2018年3月14日 下午4:29:53 
 *
 */
public class BaseReturn implements Serializable{

	/** 
	 * @Fields serialVersionUID : TODO(序列号) 
	 */ 
	private static final long serialVersionUID = 5519439318533870418L;
	
	/**
	 * 成功返回标志 成功：1，失败：0
	 */
	private String success;
	
	/**
	 * 返回消息信息
	 */
	private String message;
	
	/**
	 * 返回版本号信息
	 */
	private String version;
	
	/**
	 * 返回数据模型信息
	 */
	private Object data;
	
	/**
	 * 
	 * <p>Title: 基本返回信息构造</p> 
	 * <p>Description: 带版本号信息构造</p> 
	 * @param success
	 * @param message
	 * @param version
	 * @param data
	 */
	public BaseReturn(String success,String message,String version,Object data) {
		this.success = success;
		this.message = message;
		this.version = version;
		this.data = data;
	}
	
	/**
	 * 
	 * <p>Title: 基本返回信息构造</p> 
	 * <p>Description: 不带版本号信息构造</p>
	 * @param success
	 * @param message
	 * @param data
	 */
	public BaseReturn(String success,String message,Object data) {
		this.success = success;
		this.message = message;
		this.data = data;
	}
	
	/**
	 * 
	 * <p>Title: 基本返回信息构造</p> 
	 * <p>Description: 无参构造</p>
	 * @param success
	 * @param message
	 * @param data
	 */
	public BaseReturn() {}

	public String getSuccess() {
		return success;
	}

	public void setSuccess(String success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "BaseReturn [success=" + success + ", message=" + message
				+ ", version=" + version + ", data=" + data + "]";
	}
	
}
